from appium import webdriver
from appium.webdriver.common.touch_action import TouchAction

caps={
  "platformName": "Android",
  "platformVersion": "5.1.1",
  "deviceName": "127.0.0.1:62001",
  "appPackage": "com.jhss.youguu",
  "appActivity": "com.jhss.youguu.tip.TipScrollActivity"
}

driver=webdriver.Remote("http://localhost:4723/wd/hub",caps)
driver.implicitly_wait(30)
TouchAction(driver).press(x=110, y=1172).move_to(x=110, y=1199).release().perform()

TouchAction(driver).press(x=13, y=1080).move_to(x=31, y=1062).release().perform()

TouchAction(driver).press(x=35, y=988).move_to(x=26, y=1023).release().perform()

TouchAction(driver).tap(x=105, y=1853).perform()
TouchAction(driver).tap(x=132, y=597).perform()
TouchAction(driver).tap(x=500, y=926).perform()
TouchAction(driver).tap(x=505, y=465).perform()
el1 = driver.find_element_by_id("com.jhss.youguu:id/et_username")
el1.send_keys("18070759112")
el2 = driver.find_element_by_id("com.jhss.youguu:id/et_password")
el2.send_keys("chen5500.")
TouchAction(driver).tap(x=105, y=1853).perform()




